<extend name="Common:sysTemplate" />
<block name="content">
<div class="Item hr">
    <span class="fr">数据库中共有{$tables}张表，共计{$total}</span>
    <div class="current">数据库表结构列表</div>
</div>
<form onsubmit="return pageAjaxSubmit();">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_list" id="dbTables">
        <thead>
            <tr>
                <td width="90"><input type="checkbox" onclick="clickCheckbox(this)"/></td>
                <td>表名</td>
                <td>表用途</td>
                <td>记录行数</td>
                <td>引擎类型</td>
                <td>字符集</td>
                <td>表大小</td>
            </tr>
        </thead>
        <tbody>
            <volist name="list" id="tab">
                <tr align="center">
                    <td><input type="checkbox" name="table[]" value="{$tab.Name}"/></td>
                    <td align="left">{$tab.Name}</td>
                    <td>{$tab.Comment}</td>
                    <td>{$tab.Rows}</td>
                    <td>{$tab.Engine}</td>
                    <td>{$tab.Collation}</td>
                    <td>{$tab.size}</td>
                </tr>
            </volist>
        </tbody>
        <tfoot align="center">
            <tr>
                <td width="90"></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td>总计：{$total}</td>
            </tr>
        </tfoot>
    </table>
    <div class="commonBtnArea" >
        <input type="submit" id="subBtn" value="备份所选" />
    </div>
</form>
</block>
<block name="footjs">
<script type="text/javascript">
var pageAjaxSubmit = function (){
    if($("#dbTables tbody input[type='checkbox']:checked").size()==0){
        $.jBox.tip('请先选择你要备份的数据库表吧');
        return false;
    }
    if($('#subBtn').attr("disabled")){
        $.jBox.tip('已提交，系统在处理中...');
    }else{
        $('#subBtn').attr("disabled",true).val("提交处理中...");
        return commonAjaxSubmit("__URL__/backup");
    }
}
</script>
</block>